/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package poproject.Common;

import java.awt.Component;
import javax.swing.JTable;

/**
 * Małe rozszerzenie do tablicy automatycznie numerujące wiersze.
 * @author Eruanno
 */
public class JNumberedTable extends JTable {
    public JNumberedTable()
    {
        //super();
    }
    
    /**
     * A simple extention that allows to render row number in each row in the table.
     * @param row
     * @param column 
     * @return Row number or default value from super class.
     */
    @Override
    public Object getValueAt(int row, int column) {
        if (column == 0) {
            return row+1;
        }
        return super.getValueAt(row, column);
    }

}
